package com.i2863.receipt.entity;

import com.i2863.receipt.util.BaseEntity;
import lombok.Data;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 中奖表实体
 * Created by Administrator on 2018/6/8.
 */
@Table(name = "d_winner")
@Entity
@Data
public class Winner extends BaseEntity{

    /**
     * 中奖者联系电话
     */
    @Column(name = "win_phonenum",nullable = false)
    private String winPhoneNum;

    /**
     * 中奖金额
     */
    @Column(name = "money",nullable = true)
    private BigDecimal money;

    /**
     * 奖品等级（0 特等奖，1 一等奖，2 二等奖，3 三等奖，4 四等奖）
     */
    @Column(name = "level",nullable = true)
    private Integer level;

    /**
     * 奖品等级名称
     */
    @Column(name = "level_name",nullable = true)
    private String levelName;

    /**
     * 奖项类别
     */
    @Column(name = "prize",nullable = true)
    private Integer prize;

    /**
     * 奖项名称
     */
    @Column(name = "prize_name",nullable = true)
    private String prizeName;

    /**
     *  是否场内 true 是  false 否
     */
    @Column(name = "is_inside",nullable = true)
    private Boolean isInside;

    /**
     * 是否从是从未入围观众中抽取 true 是 false 否
     */
    @Column(name = "is_reselection",nullable = true)
    private Boolean isReselection;

    /**
     * 发票代码
     */
    @Column(name = "receipt_code",nullable = false)
    private String receiptCode;

    /**
     * 发票代码号码
     */
    @Column(name = "receipt_codenum",nullable = false)
    private String receiptCodeNum;

    /**
     * 发票金额
     */
    @Column(name = "receipt_money",nullable = false)
    private Double receiptMoney;

    /**
     * 发票开具日期
     */
    @Column(name = "receipt_date",nullable = false)
    private Date receiptDate;

    /**
     * 所属活动
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name="activity_id")
    private Activity activity;

    /**
     *所属站点
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name="site_id")
    private Site site;

}
